<template>
  <header class="login-header">
    <logo-full-icon class="logo" />
    <div class="operations-container">
      <el-button v-show="false" text @click="navToGitHub">
        <span>GitHub</span>
      </el-button>
      <el-button v-show="false" text @click="navToHelper">
        <el-icon><question-filled /></el-icon>
      </el-button>
      <translate-select />
      <el-button text @click="toggleSettingPanel">
        <el-icon><setting /></el-icon>
      </el-button>
    </div>
  </header>
</template>

<script lang="ts" setup>
import { QuestionFilled, Setting } from '@element-plus/icons-vue';

// Note: These assets will need to be copied or made available in the login app
// For now, using placeholder implementations
const LogoFullIcon = { template: '<div class="logo-placeholder">LOGO</div>' };
const TranslateSelect = { template: '<div class="translate-placeholder">语言</div>' };

// Simplified settings toggle - will need proper integration with main app
const toggleSettingPanel = () => {
  console.log('Toggle setting panel - needs integration with main app');
};

const navToGitHub = () => {
  window.open('https://github.com/tencent/tdesign-vue-next-starter');
};

const navToHelper = () => {
  window.open('http://tdesign.tencent.com/starter/docs/get-started');
};
</script>

<style lang="less" scoped>
.login-header {
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  color: var(--el-text-color-primary);
  height: 64px;

  .logo {
    width: 178px;
    height: 32px;
  }

  .logo-placeholder {
    width: 178px;
    height: 32px;
    background: var(--el-color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--el-border-radius-base);
    font-weight: 600;
    font-size: 18px;
  }

  .translate-placeholder {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    color: var(--el-text-color-primary);
    font-size: 14px;

    &:hover {
      background: rgba(255, 255, 255, 0.2);
    }
  }

  .operations-container {
    display: flex;
    align-items: center;

    .el-button {
      margin-left: 16px;
    }
  }
}
</style>
